import request from '@/router/axios';
import {
  fenExYuangettoFixed, getAppealTypes, getIs_sup_payment,
  getLineName, getMappingStatus,
  getNoticeStates,
  getStationName, is_sup_payment,
  allStatus, getMappingStatusArray, getQianxiangType, numToTwoPoint
} from "../../../subwayRat/commonCheck";


/**
 * 结账单据的查询
 * @param query
 */
export function get_xw_pk_JieZhangDanjuData(query) {
  return request({
    url: '/check/cz_xw/get_xw_pk_JieZhangDanjuData',
    method: 'post',
    params: query,
    data:query,
  })
}


/**
 * 车站数据查询
 * @param query
 */
export function get_xw_pk_CarData(query) {
  return request({
    url: '/check/cz_xw/get_xw_pk_CarData',
    method: 'post',
    params: query,
    data:query,
  })
}




export const xw_pk_cy_option_cols1 = {
  emptyBtn: false,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  border: true,
  index: false,
  header:false,
  menu:false,
  indexLabel: '序号',
  align: 'center',
  menuWidth: 150,
  menuAlign: 'center',
  selection: false,
  reserveSelection: false,
  column: [{
    label: 'tvm编号',
    prop: "tvmCode",
    },
    {
    label: '接收纸币',
    prop: "receiveNotes",
      formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '接收硬币',
      prop: "receiveCoin",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '纸币找零',
      prop: "noteChangen",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '硬币找零',
      prop: "coinChange",
      type:'number',formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '故障退款金额',
      prop: "faultRefundAmount",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '接收总计',
      prop: "receiveTotalMoney",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '售票总计',
      prop: "sellTicketTotalMoney",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '找零总计',
      prop: "changeTotalMoney",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '充值总计',
      prop: "rechargeMoney",formatter:function (row,v,label,col) {
        return numToTwoPoint(v);
      }
    },
    {
      label: '开始时间',
      prop: "startTime",
      type:'date',
      format:'yyyy-MM-dd'
    },
    {
      label: '结束时间',
      prop: "endTime",
      type:'date',
      format:'yyyy-MM-dd'
    }
  ]
}

export const xw_pk_cy_option_cols2= {
  emptyBtn: false,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  border: true,
  index: false,
  header:false,
  menu:false,
  indexLabel: '序号',
  align: 'center',
  menuWidth: 150,
  menuAlign: 'center',
  selection: false,
  reserveSelection: false,
  column: [{
    label: 'tvm编号',
    prop: "tvmCode"
  },
    {
    label: '收入时间',
    prop: "incomeTime",
    },
    {
    label: '接收纸币',
    prop: "rReceiveNotes",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '接收硬币',
      prop: "rReceiveCoin",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '接收总计',
      prop: "rReceiveMoney",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '纸币找零',
      prop: "rNoteChange",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '硬币找零',
      prop: "rCoinChange",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '找零总计',
      prop: "rChangeTotalMoney",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '售票金额',
      prop: "rSellTicketMoney",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '充值金额',
      prop: "rRechargeTotal",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    },
    {
      label: '退款金额',
      prop: "rReturnTotal",
      formatter:function (row,v,label,col) {
        return fenExYuangettoFixed(row,col.prop);
      }
    }
    ]
};
